package www.lagou.app;

import org.junit.Test;
import www.lagou.dao.EmployeeDao;
import www.lagou.entity.Employee;

import java.sql.SQLException;
import java.util.List;

/**
 * EmployeeDao的测试类
 */
public class TestEmployeeDao {
    private EmployeeDao employeeDao = new EmployeeDao();

    @Test
    public void testFindEmployees() throws SQLException {
        List<Employee> employees = employeeDao.findEmployees();
        if (employees != null || employees.size() != 0){
            for (Employee e:employees) {
                System.out.println(e);
            }
        }else
            System.out.println("查询结果为空！");
    }

    @Test
    public void testFindEmployeesInfo() throws SQLException {
        List<List<String>> lists = employeeDao.findEmployeesInfo();
        if (lists != null || lists.size() != 0){
            for (List<String> list:lists) {
                System.out.println(list);
            }
        }else
            System.out.println("查询结果为空！");
    }
}
